using System;
using System.Collections.Generic;
using System.Text;

namespace StatePattern
{
    public class Work
    {
        private State current;

        public Work()
        {
            current = new ForenoonState();
        }

        private double _hour;

        public double Hour
        {
            get { return _hour; }
            set { _hour = value; }
        }

        private bool _TaskFinished = false;

        public bool TaskFinished
        {
            get { return _TaskFinished; }
            set { _TaskFinished = value; }
        }

        public void SetState(State s)
        {
            current = s;
        }

        public void WriteState()
        {
            current.WriteProgram(this);
        }
    }
}
